<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class AddFieldMainUnitIdToPointPositionTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('point_position', function (Blueprint $table) {
            $table->unsignedBigInteger('main_unit_id',false)->index()->default(0)->comment('责任单位id')->after('name');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('point_position', function (Blueprint $table) {
            $table->dropColumn('main_unit_id');
        });
    }
}
